﻿using System.Collections.Generic;
using NExt.util;
using NExt.Core.Model.Base;

namespace NExt.grid
{
    public class ColumnModel : ColumnModel<ColumnModelEvents>
    {
    }

    public abstract class ColumnModel<TEvents>: Observable<TEvents>
        where TEvents : ColumnModelEvents, new()
    {
        protected ColumnModel()
        {
            columns = new List<IColumn>();
        }

        public bool? defaultSortable { get; set; }
        public int? defaultWidth { get; set; }
        public IList<IColumn> columns { get; set; }
    }

    public class ColumnModelEvents : ObservableEvents
    {
        public IScript columnmoved { get; set; }
        public IScript configchanged { get; set; }
        public IScript headerchange { get; set; }
        public IScript hiddenchange { get; set; }
        public IScript widthchange { get; set; }
    }
}
